import java.util.ArrayList;
import java.util.List;

public class TestMain {
    public static void main(String[] args) {
        // 实例化课程
        Course course1 = new Course("C001", "Java 编程", "教学楼 A101", "周一 8:00-10:00");
        Course course2 = new Course("C002", "数据结构", "教学楼 B202", "周三 14:00-16:00");

        // 实例化教师
        Teacher teacher1 = new Teacher("T001", "王老师", "男");
        Teacher teacher2 = new Teacher("T002", "赵老师", "女");

        // 实例化学生
        Student student1 = new Student("S001", "小李", "男");
        Student student2 = new Student("S002", "小张", "女");

        List<Teacher> teachers = new ArrayList<>();
        teachers.add(teacher1);
        teachers.add(teacher2);

        List<Student> students = new ArrayList<>();
        students.add(student1);
        students.add(student2);

        // 模拟教师开课
        teacher1.openCourse(course1);
        teacher2.openCourse(course2);

        // 模拟学生选课、退课
        student1.selectCourse(course1);
        student1.selectCourse(course2);
        student2.selectCourse(course1);
        student1.dropCourse(course2);

        // 模拟打印学生课表
        student1.printTimetable(teachers);
        student2.printTimetable(teachers);
    }
}